#!/data/data/com.termux/files/usr/bin/bash

echo '脚本正在开发哦~'
exit 1

cd $HOME
if [[ "$(uname -o)" != "Android" ]] ; then
    echo '呀，快点加群问问吧862297279'
    exit 1
fi

termux-setup-storage
if ! [ -x "$(command -v proot)" ]; then
    pkg install proot -y
fi
if ! [ -x "$(command -v git)" ]; then
    pkg install git -y
fi
if ! [ -x "$(command -v curl)" ]; then
    pkg install curl -y
fi
if ! [ -x "$(command -v python)" ]; then
    pkg install python -y
fi
if [ ! -f ".bashrc" ]; then
    echo echo 使用 u 启动Ubuntu > .bashrc
fi
if [ ! -f "$PREFIX/bin/u" ]; then
    echo echo 正在启动Ubuntu > $PREFIX/bin/u
    sed -i -e "1a cd ~/Termux-Linux/Ubuntu" $PREFIX/bin/u
    sed -i -e "2a ./start-ubuntu.sh" $PREFIX/bin/u
    chmod 777 $PREFIX/bin/u
fi
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main@' $PREFIX/etc/apt/sources.list
git clone https://gitee.com/Le-niao/termux-install-linux.git
cd termux-install-linux
yes 1 | python termux-linux-install.py
cd ~/Termux-Linux/Ubuntu
./start-ubuntu.sh

bash <(curl -sL https://gitee.com/bingxtang/btyun-yunzai/raw/master/btyun.sh)